home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / CTreeViewer Archive / CTreeViewer.h < prev   
Encoding:
C/C++ Source or Header  |  1992-02-17  |  1.7 KB  |  58 lines  |  [TEXT/KAHL]

  1. /* CTreeViewer.h */
  2.  
  3. #pragma once
  4.  
  5. #include <CDirector.h>
  6.  
  7. // Forward references
  8. class CBureaucrat;
  9. class CDirectorOwner;
  10. class CDesktop;
  11. class CPicture;
  12. class CScrollPane;
  13. class CView;
  14.  
  15. class CTreeViewer : public CDirector
  16. {
  17.  
  18. public:
  19.     CPicture    *itsPicture;
  20.     CScrollPane    *itsScrollPane;
  21.  
  22.     void ITreeViewer (short WINDid, Boolean floating, CDesktop *anEnclosure,
  23.                     CDirectorOwner *aSupervisor);
  24.     virtual void ShowSubviews (CView *theView);
  25.     virtual void ShowEnclosures (CView *theView);
  26.     virtual void ShowSupervisors (CBureaucrat *theBureaucrat);
  27.     virtual void DoCommand(long theCommand);
  28.     virtual void UpdateMenus(void);
  29.  
  30. protected:
  31.     virtual void GetSizeSV (CView *theView, short *width, short *depth_p,
  32.                     short thisDepth);
  33.     virtual void DrawTreeSV (CView *theView, short h, short v, short myWidth,
  34.                     Boolean first);
  35.     virtual void GetSizeE (CView *theView, short *height_p);
  36.     virtual void DrawHierE (CView *theView, short h, short v, Boolean first);
  37.     virtual void GetSizeS (CBureaucrat *theBureaucrat, short *height_p);
  38.     virtual void DrawHierS (CBureaucrat *theBureaucrat, short h, short v, Boolean first);
  39.     virtual void InstallPicture (PicHandle thePict, short hSize, short vSize);
  40.     virtual Boolean LongToStr (long ID, Str63 theType);
  41. };
  42.  
  43. // Width and height parameters for constructing the visual tree.  Since the tree is drawn
  44. // sideways, CellWidth is a vertical measurement and CellDepth is horizontal.
  45.  
  46. #define kSVCellWidth    20
  47. #define kSVCellDepth    120
  48. #define kSVBoxWidth        112
  49. #define kSVBoxHeight    16
  50.  
  51. // Width and height parameters for showing the enclosures and the supervisors.
  52.  
  53. #define kECellHeight    20
  54. #define kECellWidth        120
  55. #define kEBoxHeight        16
  56. #define kEBoxWidth        112
  57.  
  58. #define MAX(a,b) (a)>(b) ? (a) : (b)